package com.es.common;

import javax.servlet.http.HttpServletRequest;

import com.es.main.LoginUserBeen;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class CommonDeleteAction extends ActionSupport
implements ServletRequestAware{
	 HttpServletRequest request;
	 
	 public String execute()
     throws Exception{
		 String result = "";
		 CommonBiz cmnBiz = new CommonBiz();
		 String itemid ="";
		 if (this.request.getParameter("changeitem_id") != null)
			 itemid  = this.request.getParameter("changeitem_id").toString();
		 String id = this.request.getParameter("common_id").toString();
		 cmnBiz.deleteCommonById(id);
		 result = "success";
		 String message = "删除成功";
		 request.getSession().setAttribute("list", cmnBiz.getCommonByType(itemid));
		 this.request.setAttribute("message", message);
		 return result;
	 }
	 
	public void setServletRequest(HttpServletRequest arg0) {
		// TODO Auto-generated method stub
		this.request = arg0;
	}
	

}
